<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/purchaseinfo/q_purchase_payment_dhtj/q_purchase_payment_dhtj.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/purchaseinfo/q_purchase_payment_dhtj/q_purchase_payment_dhtj.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Purchase_payment',
                footer: "Foots",
                cnName: '采购付款单号统计',
                name: 'q_purchase_payment_dhtj/q_purchase_payment_dhtj',
                url: "/q_purchase_payment_dhtj/",
                sortName: "Voucher_sub"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"Voucher_sub":"","Supplier":"","je":[null,null],"PaymentType":"","CreateDate":"","AuditStatus":""});
            const searchFormOptions = ref([[{"title":"单号","field":"Voucher_sub","type":"like"},{"dataKey":"供应商客户","data":[],"title":"供应商","field":"Supplier","type":"select"},{"title":"付款金额","field":"je","type":"range"}],[{"dataKey":"结账类型","data":[],"title":"付款方式","field":"PaymentType","type":"select"},{"title":"单据日期","field":"CreateDate","type":"datetime"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"}]]);
            const columns = ref([{field:'Purchase_payment',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Voucher_sub',title:'单号',type:'string',sort:true,width:120,align:'left',sort:true},
                       {field:'Supplier',title:'供应商',type:'int',bind:{ key:'供应商客户',data:[]},width:110,align:'left'},
                       {field:'sl',title:'数量',type:'float',width:110,align:'left'},
                       {field:'je',title:'付款金额',type:'decimal',width:110,align:'left'},
                       {field:'spmx',title:'采购单明细',type:'string',width:200,align:'left'},
                       {field:'PaymentType',title:'付款方式',type:'int',bind:{ key:'结账类型',data:[]},width:110,align:'left'},
                       {field:'CreateDate',title:'单据日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'sprmx',title:'审批明细',type:'string',width:200,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
